ActionController::Routing::Routes.draw do |map|
  map.resources :events
  map.resources :visitors
  map.resources :people
  map.resources :users
  map.resources :user_sessions

  map.login "login", :controller => 'user_sessions', :action => 'new'
  map.logout "logout", :controller => 'user_sessions', :action => 'destroy'
  map.register "register", :controller => 'users', :action => 'new'
  map.admin "admin", :controller => 'admin', :action => 'index'
  map.visitors_signin "visitors-signin/event/:event_id", :controller => 'visitors', :action => 'signin', :event_id => 'id'
  map.visitors_attend "visitors-signin/attend/:visitor_id", :controller => 'visitors', :action => 'attend_event'
  map.visitors_transition "visitors-signin/after-signin", :controller => 'visitors', :action => 'transition'
  map.event_select "event-select", :controller => "visitors", :action => "choose_event"
  map.volunteer "volunteer/:event_id", :controller => "events", :action => "volunteer"
  map.dashboard "dashboard/:id", :controller => 'dashboard', :action => 'index', :id => 'id'
  map.visitor_reports_post "reports/visitors/get-visitors", :controller => "reports", :action => "get_visitors", :conditions => {:method => :post}
  map.visitor_reports "reports/visitors", :controller => "reports", :action => "visitors"


  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'

  map.root :controller => 'dashboard', :action => 'index', :id => 'id'
end
